var delete_click = false;
var delete_friend = false;

$(document).ready(function(){
	$("div.div_contact img").click(function(){
		if(delete_friend == true){
			$(this).fadeTo("slow",0);
			friends_index.splice(this.id,1);
			$(this).hide("slow");
			window.lemon.httpGet(server_address+"/tom/servlet/C2S1addFriends?cmd=2&_id="+this.id+"&user_id="+user_id);
		}else{
			window.lemon.js2client(2,"friends_detail.html?_id="+this.id+"&user_id="+user_id);
		}
	});
});

$(document).ready(function(){
	$("img#self").click(function(){
		window.lemon.js2client(2,"main.html?user_id="+user_id);
	});
});

$(document).ready(function(){
	window.onfocus;
});




var sqlrlt = window.lemon.searchTable("select _id from User;");
var sqlrlt1 = new String(sqlrlt);
var begin = sqlrlt1.lastIndexOf(":")+2;
var end = sqlrlt1.lastIndexOf("\"");
var user_id = sqlrlt1.substring(begin,end);

